GBML manual / 3D

view3d_hit_y

The y, in room pixels, where the last view3d_ray met a wall.

Game Boy: not available

Game Boy Color: not available

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

view3d_hit_y() -> real

Returns

real

Description

The y, in room pixels counted from the room's top-left corner (down), where the last view3d_ray met a wall. It keeps the answer until the next ray.

Example

var d = view3d_ray(view3d_angle());
var wall_y = view3d_hit_y();

Where the wall straight ahead is, top to bottom.

On the GBA

It keeps the answer of the last view3d_ray until the next one.

See also: Collision in 3Dview3d_rayview3d_hit_x